package com.gitee.cirnochat.user.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gitee.cirnochat.user.model.entity.User;
import com.gitee.cirnochat.user.model.entity.UserDetail;
import com.gitee.cirnochat.user.model.entity.UserPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author FlanChan
* @description 针对表【user(用户信息)】的数据库操作Mapper
* @createDate 2025-04-20 12:35:47
* @Entity cirno.chat.model.entity.User
*/
public interface UserMapper extends BaseMapper<User> {

    UserDetail selectUserInfoWithFriendRelById(@Param("userId") Long userId , @Param("currentUserId") Long currentUserId);

    UserPermission selectUserPermissionById(@Param("userId") Long userId , @Param("currentUserId") Long currentUserId);

    UserDetail searchByUUID(@Param("uuid")  String uuid , @Param("currentUserId") Long userId);

    List<UserDetail> searchByKeyword(@Param("page") int offset,@Param("size") int size,@Param("keyword")  String keyword,@Param("sort")  int sort,@Param("currentUserId") Long userId);

}




